<ul nz-menu [nzMode]="'inline'" class="side-menu">
  <ng-container *ngFor="let menu of menus;index as i">
    <li nz-submenu *ngIf="menu.items; else elseBlockMenu" [(nzOpen)]="menu.show" (nzOpenChange)="openHandler(i)" (click)="reload(menu.url)">
      <span title>
        <i class="{{menu.icon}} anticon"></i>
        <a *ngIf="menu.url" [ngClass]="{'active':isActive(menu.url)}">{{menu.name}}</a>
        <span *ngIf="!menu.url">{{menu.name}}</span>
      </span>
      <ul *ngIf="menu.items">
        <ng-container *ngFor="let item of menu.items">
          <li nz-submenu *ngIf="item.items; else elseBlockMenu1">
            <span title>
              <span>{{item.name}}</span>
            </span>
            <ul *ngIf="item.items">
              <li nz-menu-item *ngFor="let ite of item.items" [nzSelected]="isActive(ite.url)" (click)="reload(ite.url)">
                <a [ngClass]="{'active':isActive(ite.url)}">
                  {{ite.name}}
                </a>
              </li>
            </ul>
          </li>
          <ng-template #elseBlockMenu1>
            <li nz-menu-item [nzSelected]="isActive(item.url)" (click)="reload(item.url)">
              <span title>
                <a [ngClass]="{'active':isActive(item.url)}">{{item.name}}</a>
              </span>
            </li>
          </ng-template>
        </ng-container>

      </ul>
    </li>
    <ng-template #elseBlockMenu>
      <li nz-menu-item [nzSelected]="isActive(menu.url)" (click)="reload(menu.url)">
        <span title>
          <i class="{{menu.icon}} anticon"></i>
          <a [ngClass]="{'active':isActive(menu.url)}">{{menu.name}}</a>
        </span>
      </li>
    </ng-template>
  </ng-container>

</ul>
